home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
asmtutr.arc
/
COM2ASM.DOC
< prev
next >
Wrap
Text File
|
1983-06-19
|
2KB
|
54 lines
For DOS 2.0 (or later)
My apologies for the presumptuous sounding name of
this program. It doesn't quite do what it sounds
capable of doing, but it does make the job a bit
easier.
I use this program whenever I want to convert a
COM file to assembler source code, for subsequent
modification and re-assembly. Here's how it works:
Get into debug with the COM file you're working
with, and locate the areas containing the code
(stay away from the data areas). Write down the
starting and ending addresses for all the code
areas in the file, and quit.
Back in dos, create a file to be piped into the
standard input of the debug program, containing
the commands necessary to unassemble the program.
The easiest way to do this is to use the copy
command.
A>copy con file1
u addr1 addr2 <-- unassemble the file
u addr3 addr4
. (etc.)
.
q <-- DON'T FORGET THIS!
^Z
1 File(s) copied
A>
Now, type
DEBUG (filename).COM <FILE1 >FILE2
This will (given enough time) generate a file
called FILE2 containing the result of the
above commands to debug. Now, run the
COM2ASM.BAS program, enter FILE2 in response
to the "Input file?" prompt, and some other
(new) file name for the output file prompt.
The program will then read file2, get rid of the
hex addresses on the left and the op code,
label the intra-segment jumps and calls and their
destinations with labels of the form "Ln",
where 0<n<999, and send the results to the output
file. The result is compatible (as far as it
goes) with the macro assembler.
Rich Winkel
Columbia, Mo.
the output
file. The result is compati